function check_name(){
	var txt = document.form1.adminName;
	if(txt.value.length == 0) {
		var sp = document.getElementById("name_check");
		sp.style.visibility = "visible";
	}
}

function reset_name(){
	var sp = document.getElementById("name_check");
	sp.style.visibility = "hidden";
}

function check_pwd(){
	var txt = document.form1.adminPwd;
	if(txt.value.length == 0) {
		var sp = document.getElementById("pwd_check");
		sp.style.visibility = "visible";
	}
}

function reset_pwd(){
	var sp = document.getElementById("pwd_check");
	sp.style.visibility = "hidden";
}

function submit_check() {
	var nameText = document.form1.adminName;
	var pwdText = document.form1.adminPwd;
	var codeText = document.form1.txtcode;
	if(nameText.value.length == 0) {
		alert("请输入用户名");
	} else if(pwdText.value.length == 0) {
		alert("请输入密码");
	} else if(codeText.value.length == 0) {
		alert("请输入验证码");
	} else {
		document.form1.submit();
	}
}